package com.zhouhailin.stream.demo;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

/**
 * 创建流
 *
 * @Author zhouhailin
 * @email 289288104@qq.com
 * @date 2023/1/17 13:46
 */
public class CreateStreamDemoV1 {
    public static void main(String[] args) {
        String[] arr = new String[]{"乔丹", "科比", "詹姆斯"};
        Stream<String> stream = Arrays.stream(arr);

        System.out.println(stream);

        stream = Stream.of("乔丹", "科比", "詹姆斯");

        List<String> list = new ArrayList<>();
        list.add("乔丹");
        list.add("科比");
        list.add("詹姆斯");

        stream = list.stream();

    }
}
